<?php
namespace app\model;

use think\Model;

class Users extends Base
{
    //获取单条信息
    function get_info(array $where,string $field = 'id,mobile,name,sex,status,cardId,total_cost,create_time'){
        return $this->where($where)->field($field)->find();
    }
    //分页列表
    function get_list(array $where,array $order,string $limit,string $field='id,mobile,name,sex,status,cardId,total_cost,create_time'){
        return $this->where($where)->field($field)->order($order)->limit($limit)->select();
    }

    function get_users(array $where,array $order,string $offset,string $sort,string $field='id,mobile,name,sex,status,cardId,total_cost,create_time'){
        return $this->where($where)->field($field)->order($order)->limit($offset,$sort)->select();
    }
}